package com.auxgroup.hr.front.service.process.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.stereotype.Service;

import com.auxgroup.hr.front.dao.domain.PsCWfAsaHdr;
import com.auxgroup.hr.front.dao.domain.PsCWfAsaSub1;
import com.auxgroup.hr.front.dao.repository.PsCWfAsaHdrRepository;
import com.auxgroup.hr.front.dao.repository.PsCWfAsaSub1Repository;
import com.auxgroup.hr.front.service.process.WfAsaHdrService;

/** 
 * @author lvliuhao 
 * @version 创建时间：2018年7月18日 下午10:06:42 
 * 类说明 
 */
@Service("wfAsaHdrService")
public class WfAsaHdrServiceImpl implements WfAsaHdrService {
	
	@Autowired
	private PsCWfAsaHdrRepository psCWfAsaHdrRepository;
	
	@Autowired
	private PsCWfAsaSub1Repository psCWfAsaSub1Repository;

	@Override
	public PsCWfAsaHdr getWfAsaHdr(String transNum) {
		return psCWfAsaHdrRepository.findOne(transNum);
	}

	@Override
	public List<PsCWfAsaSub1> getWfAsaSubList(String transNum) {
		PsCWfAsaSub1 query = new PsCWfAsaSub1();
		query.setcTransactionNbr(transNum);
		return psCWfAsaSub1Repository.findAll(Example.of(query));
	}

}
 